﻿/*
 * (c) Stefan Bojarovski 2010
 * */
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASTBuilder
{
    class ErrorNode : NodesCollection, IArithmeticNode
    {
        private LexemeType lexType = LexemeType.ERROR;

        public LexemeType getLexemeType()
        {
            return lexType;
        }
        public IArithmeticNode getFirst() {return this;}
        public IArithmeticNode getSecond() { return this; }        
        public void printNode(String parentLevel, StreamWriter someStream)
        {
            someStream.WriteLine(parentLevel + " " + "Error Node");
        }
        public void setNegative() { }
        public List<Command> evalNode(ref Direction next, 
                                        ref Dictionary<String, Pair<IdentifierType, object>> Environment)
        {
            List<Command> error = new List<Command>();
            error.Add(new Command(CommandType.VOID, null, null));
            return error;
        }
    }
}
